from PySide6.QtWidgets import QPlainTextEdit
from PySide6.QtCore import Signal,QDateTime

class PlainTextEdit(QPlainTextEdit):
    """纯文本编辑

    :param QPlainTextEdit: PySide6 QPlainTextEdit
    """

    def __init__(self):
        """初始化
        """
        super().__init__()
    
    def zoomOut(self, bool,range=1):
        """缩小方法

        :param bool: 行为触发状态
        :return: 如果小于11 不缩小 其他缩小
        """
        if self.font().pointSize() <= 11 :
            range = 0
            return super().zoomOut(range)
        else:
            return super().zoomOut(range)

    def set_default_font_size(self,bool):
        """设置默认字体大小
        """
        if bool:
            print(self.font().pointSize())
            self.setFont()
            
            



